﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.IO.IsolatedStorage;

namespace Norma43
{
    public partial class passwordLocal : PhoneApplicationPage
    {
        private IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings;
        public passwordLocal()
        {
            InitializeComponent();
			MessageBox.Show("Fitxer N43 importat correctament.", "", MessageBoxButton.OK);

        }

        private void btnAcceptar_Click(object sender, RoutedEventArgs e)
        {
            if (boxPassword1.Password == boxPassword2.Password)
            {
                appSettings["Password"] = boxPassword1.Password;
                NavigationService.Navigate(new Uri("/resumTotal.xaml", UriKind.Relative));
            }
            else MessageBox.Show("La contrassenya no és igual als dos llocs.", "", MessageBoxButton.OK);

        }
    }
}
